<template>
  <div id="app" :class="darkMode !== 'light' ? 'app' : 'app-dark'">
    <!-- 一级路由 -->
    <keep-alive include="detail, readHome">
      <router-view />
    </keep-alive>
  </div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
  data() {
    return {}
  },
  computed: {
    ...mapState(['darkMode']),
  },
}
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app {
  color: #2c3e50;
  background: #fff;
}
.app-dark {
  color: #edf1f5;
  background: rgb(18, 2, 2);
}
</style>
